home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
catn
/
lrange.n
< prev
next >
Wrap
Text File
|
1994-09-20
|
1KB
|
67 lines
lrange(n) Tcl Built-In Commands
_________________________________________________________________
NAME
lrange - Return one or more adjacent elements from a list
SYNOPSIS
lrange _l_i_s_t _f_i_r_s_t _l_a_s_t
_________________________________________________________________
DESCRIPTION
_L_i_s_t must be a valid Tcl list. This command will return a
new list consisting of elements _f_i_r_s_t through _l_a_s_t,
inclusive. _L_a_s_t may be end (or any abbreviation of it) to
refer to the last element of the list. If _f_i_r_s_t is less
than zero, it is treated as if it were zero. If _l_a_s_t is
greater than or equal to the number of elements in the list,
then it is treated as if it were end. If _f_i_r_s_t is greater
than _l_a_s_t then an empty string is returned. Note: ``lrange
_l_i_s_t _f_i_r_s_t _f_i_r_s_t'' does not always produce the same result
as ``lindex _l_i_s_t _f_i_r_s_t'' (although it often does for simple
fields that aren't enclosed in braces); it does, however,
produce exactly the same results as ``list [lindex _l_i_s_t
_f_i_r_s_t]''
KEYWORDS
element, list, range, sublist
Tcl 1